import request from '@/utils/request'

export function getArticleById(id) {
  return request({
    url: `/api/web/article/${id}`,
    method: 'get'
  })
}

export function getTopArticles() {
  return request({
    url: '/api/web/article/top',
    method: 'get'
  })
}

export function getHotArticles() {
  return request({
    url: '/api/web/article/hot',
    method: 'get'
  })
}

export function increaseViewCount(id) {
  return request({
    url: `/api/web/article/${id}/viewConunt`,
    method: 'post'
  })
}